<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<link rel="stylesheet" href="/static/myskin/login.min.css?v={{.ver}}" type="text/css" charset="utf-8">
	<link rel="stylesheet" href="/static/myskin/materialdesignicons.min.css" type="text/css" charset="utf-8">
	<link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon">
	<link rel="stylesheet" href="/static/webix/webix.min.css" type="text/css" charset="utf-8">
	<script src="/static/webix/webix.min.js" type="text/javascript" charset="utf-8"></script>
	<title>{{sys_config "SystemTitle"}} | Login</title>
</head>
<body>
<script type="text/javascript" charset="utf-8">
    webix.ready(function () {
        webix.ui({
            css: "login-page",
            rows: [
                {gravity: 1},
                {
                    align: "center,middle",
                    body: {
                        css: "login-form",
                        id: "login-form",
                        view: "form",
                        scroll: false,
                        width: 320,
                        autoHeight: true,
                        paddingX: 40,
                        elements: [
                            {
                                height: 120,
                                paddingX: 10,
                                rows: [
                                    {
                                        view: "template", css: "login-logo",
                                        template: "<img src='{{.LoginLogo}}' width='210' height='88'/>",
                                        height: 88, borderless: true
                                    },
                                    {
                                        view: "label", label: '{{sys_config "SystemLoginSubtitle"}}', align: "center",
                                        css: "login-subtitle", borderless: true
                                    }
                                ]
                            },
                            {
                                id: "usernamefd",
                                cols: [
                                    {view: "label", label: " <i class='mdi mdi-account in-icon'></i>", width: 30,},
                                    {view: "text", name: "username", value: '', placeholder: "用户名", icon: "wxi-search", height: 35},
                                ]
                            },
                            {
                                id: "passwordfd",
                                cols: [
                                    {view: "label", label: " <i class='mdi mdi-key in-icon'></i>", width: 30,},
                                    {view: "text", name: "password", type: 'password', value: '', placeholder: "密码", height: 35},
                                ]
                            },
                            {
                                id: "loginbtn",
                                margin: 5, cols: [
                                    {
                                        id: "login_btn",
                                        view: "button",
                                        css: "webix_primary",
                                        label: "登录",
                                        height: 39,
                                        click: function () {
                                        	webix.send("/login", $$("login-form").getValues() , "POST", "_self")
                                        },
                                        hotkey: "enter",
                                        on: {
                                            onKeyPress: function () {
                                                webix.send("/login", $$("login-form").getValues() , "POST", "_self")
                                            }
                                        }
                                    }
                                ]
                            },
                            {view: "label", label: "{{.errmsg}}", css: "login-errmsg", borderless: true},
                            {view: "label", label: "{{.SystemLoginRemark}}", css: "login-remark", borderless: true},
                        ]
                    }
                },
                {gravity: 2}
            ]
        });
    });
</script>
</body>
</html>